package com.turing.model.caller.vo.in;

import com.alibaba.fastjson.JSONArray;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class OcrResultEntity {

    private List<PageEntity> page_json;

    private String img_file_id;

    private ImgInfo img_info;

    private String double_pdf_file_id;

    @Data
    private static class PageEntity {

        private Integer pageNo;

        private String docId;

        private Map<String,LineEntity> contIndex;

        private List<LineEntity> lineList;

        @Data
        private static class LineEntity {

            private Integer sortNo;

            private Long rowNo;

            private Integer lineNo;

            private String objContent;

            private String lineId;

            private String objType;

            private String objContent_tableCells;

            private String objType_postpreprocess;

            private JSONArray objPos;

            private List<CellInfo> cells;

            private Integer tableId;

            private String finTableId;

            private Integer row_start;

            private Integer col_start;

            private Integer row_end;

            private Integer col_end;

            private List<Integer> linePos;

        }

    }

    @Data
    public static class ImgInfo {

        private Integer titleAngle;

        private Double textRecConfidence;

        private Double imageFuzzy;

        private Integer[] size;

    }

    @Data
    public static class CellInfo {
        private String id;

        private Integer lineNo;

        private Integer lineId;

        private String objContent;

        private List<Integer> objPos;

        private String objType;

        private List<Integer> row_start_end;

        private List<Integer> col_start_end;
    }

}
